package com.cheng.sell.enums;

import lombok.Getter;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * <p>
 * Description:
 * </p>
 *
 * @author chengxintao
 * @version 1.0
 * <p>
 * <p>
 * History:
 * <p>
 * Date                 Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2018/8/24         chengxintao          1.0         To create
 * </p>
 * @see
 * @since
 */
@Getter
public enum ResultEnum {
    PARAM_ERROR(1, "参数不正确"),
    CART_EMPTY(2, "购物车不能为空"),
    PRODUCT_NOT_EXIST(10, "商品不存在"),
    PRODUCT_NOT_ENOUGH(20, "该商品库存不足"),
    ORDER_NOT_EXIST(30, "该商品订单不存在"),
    ORDER_DETAIL_NOT_EXIST(40, "该订单商品详情不存在"),
    ORDER_STATUS_FAILED(50, "订单状态不正确"),
    ORDER_UPDATE_FAILED(60, "订单修改状态失败"),
    ORDER_STATUS_PAY_FAILED(70, "支付状态不正确"),
    ORDER_UPDATE_PAY_FAILED(80, "修改订单支付状态失败"),
    ORDER_OWNER_ERROR(90, "支付状态不正确"),
    WX_MP_ERROR(9, "微信公众账号获取openid错误"),
    ;
    private Integer code;
    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
